package com.cloud.log.kafka.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Service;

import com.cloud.log.api.entity.SysLog;
import com.cloud.log.kafka.service.LogService;


@Service
public class LogServiceImpl implements LogService{

	@Autowired
	private KafkaTemplate<String, String> template;
	
	@Override
	public boolean saveSysLog(SysLog syslog) {
//		template.send("", data)
		template.send("myTopic", syslog.getEventText());
		return true;
	}

}
